<?php

namespace app\models;

use Yii;

/**
 * This is the model class for table "news_tbl".
 *
 * @property int $news_id
 * @property int $cateId
 * @property string $news_title
 * @property string $newImg
 * @property string $news_company
 * @property int|null $newsTime
 * @property string $news_content
 * @property string $Report_Mailbox
 * @property int $like_count
 * @property int $comment_count
 * @property int $collect_count
 * @property int $forward_count
 * @property int $createTime 创建时间
 * @property int $updateTime 修改时间
 */
class NewsTbl extends \yii\db\ActiveRecord
{


    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return 'news_tbl';
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['newsTime'], 'default', 'value' => null],
            [['cateId', 'news_title', 'newImg', 'news_company', 'news_content', 'Report_Mailbox', 'like_count', 'comment_count', 'collect_count', 'forward_count', 'createTime', 'updateTime'], 'required'],
            [['cateId', 'newsTime', 'like_count', 'comment_count', 'collect_count', 'forward_count', 'createTime', 'updateTime'], 'integer'],
            [['news_content'], 'string'],
            [['news_title', 'news_company'], 'string', 'max' => 100],
            [['newImg'], 'string', 'max' => 200],
            [['Report_Mailbox'], 'string', 'max' => 50],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'news_id' => 'News ID',
            'cateId' => 'Cate ID',
            'news_title' => 'News Title',
            'newImg' => 'New Img',
            'news_company' => 'News Company',
            'newsTime' => 'News Time',
            'news_content' => 'News Content',
            'Report_Mailbox' => 'Report Mailbox',
            'like_count' => 'Like Count',
            'comment_count' => 'Comment Count',
            'collect_count' => 'Collect Count',
            'forward_count' => 'Forward Count',
            'createTime' => 'Create Time',
            'updateTime' => 'Update Time',
        ];
    }

}
